package com.kitty.web.system.onlinemall.service.impl;

import com.kitty.web.domain.POnlinemall;
import com.kitty.web.mapper.POnlinemallMapper;
import com.kitty.web.system.onlinemall.service.IPOnlinemallService;
import com.kitty.web.core.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 元宝商城Service业务层处理
 * 
 * @author soul
 * @date 2022-03-10
 */
@Service
public class POnlinemallServiceImpl implements IPOnlinemallService
{
    @Autowired
    private POnlinemallMapper pOnlinemallMapper;

    /**
     * 查询元宝商城
     * 
     * @param id 元宝商城ID
     * @return 元宝商城
     */
    @Override
    public POnlinemall selectPOnlinemallById(Long id)
    {
        return pOnlinemallMapper.selectPOnlinemallById(id);
    }

    /**
     * 查询元宝商城列表
     * 
     * @param pOnlinemall 元宝商城
     * @return 元宝商城
     */
    @Override
    public List<POnlinemall> selectPOnlinemallList(POnlinemall pOnlinemall)
    {
        return pOnlinemallMapper.selectPOnlinemallList(pOnlinemall);
    }

    /**
     * 新增元宝商城
     * 
     * @param pOnlinemall 元宝商城
     * @return 结果
     */
    @Override
    public int insertPOnlinemall(POnlinemall pOnlinemall)
    {
        return pOnlinemallMapper.insertPOnlinemall(pOnlinemall);
    }

    /**
     * 修改元宝商城
     * 
     * @param pOnlinemall 元宝商城
     * @return 结果
     */
    @Override
    public int updatePOnlinemall(POnlinemall pOnlinemall)
    {
        return pOnlinemallMapper.updatePOnlinemall(pOnlinemall);
    }

    /**
     * 删除元宝商城对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deletePOnlinemallByIds(String ids)
    {
        return pOnlinemallMapper.deletePOnlinemallByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除元宝商城信息
     * 
     * @param id 元宝商城ID
     * @return 结果
     */
    @Override
    public int deletePOnlinemallById(Long id)
    {
        return pOnlinemallMapper.deletePOnlinemallById(id);
    }
}
